package com.kevis.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kevis.common.to.mq.SeckillOrderTo;
import com.kevis.common.utils.PageUtils;
import com.kevis.gulimall.order.entity.OrderEntity;
import com.kevis.gulimall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author kevis
 * @email shua67@163.com
 * @date 2022-05-17 15:00:20
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo confirmOrder() throws InterruptedException, ExecutionException;

    SubmitOrderResponseVo submitOrder(OrderSubmitVo submitVo);

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity entity);

    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo asyncVo);

    /**
     * 微信异步通知处理
     * @param notifyData
     */
//    String asyncNotify(String notifyData);

    /**
     * 创建秒杀单
     * @param orderTo
     */
    void createSeckillOrder(SeckillOrderTo orderTo);
}

